package PhamVanHien_LTHDT06;

public class Models {
public String OddNo(EvenOdd eo){
	int[] O= new int[eo.getNumber()];
	int j = 0;
	String o = "";
	for(int i = 0; i<=eo.getNumber(); i++){
		if(i%2==0){
			j++;
			O[j] = i;
		}
	}
	for(int i = 0; i<=j; i++)
		o+= i<j ? O[i]+", ":O[i];
		return o+"\n có "+j+" số lẻ";
}

public String evenNo(EvenOdd eo){
	int [] A = new int[eo.getNumber()];
	int j = 0;
	String e = "";
	for(int i=0; i<=eo.getNumber(); i++)
		if(i%2==0){
			j++;
			A[j]=i;
		}
	for(int i=1; i<=j; i++)
		e+= i<j? A[i]+", ":A[i];
	return e+"\nCó "+j+" số chẵn";
}
}
